package com.edwin.websitebe.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.edwin.websitebe.mapper.MemberGameMapper;
import com.edwin.websitebe.model.MemberGame;
import com.edwin.websitebe.service.MemberGameService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberGameServiceImpl extends ServiceImpl<MemberGameMapper, MemberGame> implements MemberGameService {


    @Override
    public List<MemberGame> listByMemberId(Long memberId) {
        LambdaQueryWrapper<MemberGame> wrapper = new QueryWrapper<MemberGame>().lambda()
                .eq(MemberGame::getMemberId, memberId);
        return list(wrapper);
    }
}
